﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniErp.Entity.DataStreams.DOs
{
    /// <summary>
    /// 权限表实体
    /// </summary>
    [Table("Rights")]
    public class Rights : BaseEntity
    {
        /// <summary>
        /// 权限编号
        /// </summary>
        [Key]
        [ConcurrencyCheck]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int RightsId { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        [Required]
        [MaxLength(20,ErrorMessage ="权限名称不能大于20个字符")]
        public string RightName { get; set; }
        /// <summary>
        /// 权限描述
        /// </summary>
        [Column(TypeName = "text")]
        public string RightDescribe { get; set; }

        #region 导航属性
        public virtual List<JobsSystemsRights> JobsSystemsRights { get; set; }
        #endregion
    }
}
